package org.ibase4j.system.add.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.ibase4j.system.add.TreeNode;

import java.util.ArrayList;
import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class AppMenu {
    protected Long id;
    private String menuName;
    private String menuType;
    private String permission;
    private String path;
    private String component;
    private String icon;
    private Object meta;
    protected Long parentId;

    @TableField(exist = false)
    protected List children = new ArrayList<>();

    public void add(TreeNode node) {
        children.add(node);
    }

}
